package com.itheima.spring;

import com.itheima.spring.config.HmConfig;
import com.itheima.spring.service.TagService;
import com.itheima.spring.service.UserService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author ：sean
 * @date ：Created in 2020/6/19
 * @description ：
 * @version: 1.0
 */
public class SpringApp {
	public static void main(String args[]) throws Exception{
		//ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("beans.xml");

		AnnotationConfigApplicationContext ac
				= new AnnotationConfigApplicationContext(HmConfig.class);

		UserService userService = ac.getBean(UserService.class);
		userService.findUserList();
		System.out.println(userService);

		Object x = ac.getBean("x");
		System.out.println(x);

		TagService tagService = ac.getBean(TagService.class);
		System.out.println(tagService);

	}
}
